import axios from "../index.js";

// 获取单位名称树
export const unitList = (data) => {
  return axios.request({
    url: "/system/organization/getOrganizationUntilList",
    method: "get",
    data: data
  });
};
// 查询值班信息
export const dutyInfo = (data) => {
  return axios.request({
    url: "/system/organization/listPageForDuty",
    method: "post",
    data
  });
};
// 值班信息新增/编辑/删除
export const saveDutyInfo = (data) => {
  return axios.request({
    url: "/system/organization/saveDutyInfo",
    method: "post",
    data
  });
};

export const getRoleUser = (data) => {
  return axios.request({
    url: "/system/account/getRoleUser",
    method: "get",
    data
  });
};

// 查询班次配置
export const getDutyShiftList = (data) => {
  return axios.request({
    url: "/system/system/tDutyShift/getListPage",
    method: "post",
    data
  });
};
// 班次配置新增/编辑/删除
export const savaDutyList = (data) => {
  return axios.request({
    url: "/system/system/tDutyShift/savaDutyList",
    method: "post",
    data
  });
};

// 同步值班人员库
export const getDutyStaff = (data) => {
  return axios.request({
    url: "/system/account/synchronizeDutyStaff",
    method: "POST",
    data
  });
};
// 删除班次配置
export const deletedDutyById = (data) => {
  return axios.request({
    url: "/system/system/tDutyShift/deletedDutyByIds",
    method: "post",
    data
  });
};

// 同步值班人员库
export const synchronization = (data) => {
  return axios.request({
    url: "/duty/dutyStaff/synchronizeStaff",
    method: "get",
    data
  });
};
